<template>
	<!--用户指南页面-->
	<view class="community">
		<view class="big_box" style="top:0;padding-top: 120rpx;">
			<view class="big_box_inner">
				<view class="big_inner_one" style="padding: 10rpx 0;">
					<view class="" v-for="(info,index) in list" :key="index">
						<view class="guide_li" @tap="info.isshow=!info.isshow">
							<image class="guide_li_icon" v-if="!info.isshow" src="../../../common/img/right_jiantou.png" mode=""></image>
							<image class="guide_li_icon" v-if="info.isshow" src="../../../common/img/bottom_jiantou.png" mode=""></image>
							{{info.title}}
						</view>
						<view class="guide_show padding-sm" v-if="info.isshow">
							<rich-text :nodes="info.content.replace(/\<img/gi, '<img style=max-width:100%;height:auto')"></rich-text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabIndex: 1,
				index: 0,
				list:[]
			}
		},
		onLoad() {
			this.getGuide();
		},
		methods: {
			getGuide(){
				let that=this;
				that.http.tokenreq({
					url: 'user/v1/getguide',
				}).then((res) => {
					let e=res.data;
					console.log(e)
					if(e.code==0 && e.success){
					   let list=e.rows;
					   list.forEach(item => {
					   	  item.isshow=false;
					   });
					   that.list=list;
					   
					}
				})
			}
		}
	}
</script>
<style>
	page{
		background-color: #FFFFFF;
	}
	.guide_li{
		height:100rpx;
		border-bottom: 1rpx solid #eee;
		padding-left:10rpx;
	}
	
</style>
